<%= collapser_for "upload", :autohide => true, :label => "Hide Uploader" %>

<div id="upload">
	<h1>Upload bookmark file from Firefox/Camino/Mozilla</h1>

	<%= form_tag(commands_path, :method=>:post, :multipart => true) %>
		<input type="file" class="text" name="bookmarks_file" />
		<input type="submit" class="submit" name="Upload" value="Upload Bookmarks" />
	</form>
</div>

<%= hide "upload" %>

<h1><%= @ancestor ? "Duplicate Command: #{@ancestor.name}" : "New Command" %></h1>

<%= expander_for "upload", :autohide => false, :label => "Lots of Commands? Upload them!" %>

<% if current_user.commands.count < 10 %>
<div class="msg">
 <p>Sorry to be patronizing, but it looks like you're a new user, so here are some tips to help you create your first command.</p>
	
	<ul class="options toolbar">
		<li class="check">If you're creating a quicksearch, replace the search portion of the URL with the following: <code>(q)</code></li>
		<li class="check">Don't forget to start your command URL with <code>http://</code> or <code>https://</code>. If you're creating a bookmarklet, don't forget the <code>javascript:</code></li>
		<li class="check">The easiest way to familiarize yourself with how commands work is to copy them from <%= link_to "other users", users_path  %> and customize them to your liking.</li>
	</ul>
</div>
<% end %>

<%= error_messages_for :command %>

<% form_for :command, :url => commands_path do |f| %>

	<%= render :partial => "command_edit_form", :locals => {:f => f} %>

  <div class="floatkiller">	
    <%= submit_tag "Create Command", :class => "submit" %>
  </div>
<% end %>